package cn.kgc.easybuy.config;

import cn.kgc.easybuy.utils.SftpUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SftpUtilConfig {
    @Value("${sftp.host}")
    private String sftpHost;
    @Value("${sftp.port}")
    private String sftpPort;
    @Value("${sftp.username}")
    private String sftpUserName;
    @Value("${sftp.password}")
    private String sftpPassword;

    @Bean
    public SftpUtil sftpUtil(){
        return  new SftpUtil(sftpUserName,sftpPassword,sftpHost,Integer.parseInt(sftpPort));
    }
}
